(function(angular) {
	'use strict';
	angular.module("fs.waf").config([ 'modalServiceProvider', 'routerServiceProvider', function(modalServiceProvider, routerServiceProvider) {
		
		//view asserrepayment in discount
		modalServiceProvider.setDialogsModule('apf.discount.viewAssetRepayment', {
			title : 'title.dialogs.popup',
			pageId : 'APF_POPUP_DISCOUNT_VIEWASSETREPAYMENT',
			templateUrl : 'apf/view/${theme}/popup/discount/viewAssetRepayment.html',
			controller : 'apf.popup.discount.viewAssetRepaymentController',
			controllerAs : 'vm',
			dependentFiles : [ 'apf/view/${theme}/popup/discount/viewAssetRepaymentController.js', 'waf/js/module/uigrid/ui-grid.css',
					'waf/js/module/uigrid/ui-grid.js' ],
			layoutConfig : 'do/apf/layout/popup/viewAssetRepayment',
			i18nConfig : 'do/apf/resource/popup/viewAssetRepayment',
			authorizationConfig : 'do/apf/authorization/popup/viewAssetRepayment',
			validatorConfig : 'do/apf/validator/popup/viewAssetRepayment'
		});
		
		//view discount charge detail
		modalServiceProvider.setDialogsModule('apf.disccharge.detail', {
			title : 'title.dialogs.popup',
			pageId : 'APF_POPUP_DISCOUNT_CHARGEDETAIL',
			templateUrl : 'apf/view/${theme}/popup/discount/discChargeDetail.html',
			controller : 'apf.popup.discount.discChargeDetail',
			controllerAs : 'vm',
			dependentFiles : [ 'apf/view/${theme}/popup/discount/discChargeDetailController.js', 'waf/js/module/uigrid/ui-grid.css',
			                   'waf/js/module/uigrid/ui-grid.js' ],
			                   layoutConfig : 'do/apf/layout/popup/discChargeDetail',
			                   i18nConfig : 'do/apf/resource/popup/discChargeDetail',
			                   authorizationConfig : 'do/apf/authorization/popup/discChargeDetail',
			                   validatorConfig : 'do/apf/validator/popup/discChargeDetail'
		});
		//view discount charge detail
		modalServiceProvider.setDialogsModule('apf.discount.removedinvlist', {
			title : 'title.dialogs.removed.inv',
			pageId : 'APF_POPUP_DISCOUNT_REMOVED_INV',
			templateUrl : 'apf/view/${theme}/popup/discount/removedInvList.html',
			controller : 'apf.popup.discount.removedInvList',
			controllerAs : 'vm',
			dependentFiles : [ 'apf/view/${theme}/popup/discount/removedInvListController.js', 'waf/js/module/uigrid/ui-grid.css',
			                   'waf/js/module/uigrid/ui-grid.js' ],
			                   layoutConfig : 'do/apf/layout/popup/removedInvList',
			                   i18nConfig : 'do/apf/resource/popup/removedInvList',
			                   authorizationConfig : 'do/apf/authorization/popup/removedInvList',
			                   validatorConfig : 'do/apf/validator/popup/removedInvList'
		});
		
		//Cash Pattern dynamic parameter popup
		modalServiceProvider.setDialogsModule('apf.discount.cashPattern', {
			title : 'title.dialogs.cashpattern',
			pageId : 'APF_POPUP_DISCOUNT_CASH_PATTERN',
			templateUrl : 'apf/view/${theme}/popup/discount/cashPattern.html',
			controller : 'apf.popup.discount.cashPattern',
			controllerAs : 'vm',
			dependentFiles : [ 'apf/view/${theme}/popup/discount/cashPatternController.js', 'waf/js/module/uigrid/ui-grid.css',
			                   'waf/js/module/uigrid/ui-grid.js' ],
			                   layoutConfig : 'do/apf/layout/popup/cashPattern',
			                   i18nConfig : 'do/apf/resource/popup/cashPattern',
			                   authorizationConfig : 'do/apf/authorization/popup/cashPattern',
			                   validatorConfig : 'do/apf/validator/popup/cashPattern'
		});
		//Partial Pay Type dynamic parameter popup
		modalServiceProvider.setDialogsModule('apf.payment.partialPayType', {
			title : 'title.dialogs.partialpaytype',
			pageId : 'APF_POPUP_PARTIAL_PAYMENT_TYPE',
			templateUrl : 'apf/view/${theme}/popup/payment/partialPayType.html',
			controller : 'apf.popup.payment.partialPayType',
			controllerAs : 'vm',
			dependentFiles : [ 'apf/view/${theme}/popup/payment/partialPayTypeController.js', 
			                   'apf/js/${theme}/service/buyBack/buyBackService.js',
			                   'waf/js/module/uigrid/ui-grid.css',
			                   'waf/js/module/uigrid/ui-grid.js' ],
			                   layoutConfig : 'do/apf/layout/popup/partialPayType',
			                   i18nConfig : 'do/apf/resource/popup/partialPayType',
			                   authorizationConfig : 'do/apf/authorization/popup/partialPayType',
			                   validatorConfig : 'do/apf/validator/popup/partialPayType'
		});
		//Buy Back Type dynamic parameter popup
		modalServiceProvider.setDialogsModule('apf.payment.buyBackType', {
			title : 'title.dialogs.buybacktype',
			pageId : 'APF_POPUP_BUY_BACK_TYPE',
			templateUrl : 'apf/view/${theme}/popup/payment/buyBackType.html',
			controller : 'apf.popup.payment.buyBackType',
			controllerAs : 'vm',
			dependentFiles : [ 'apf/view/${theme}/popup/payment/buyBackTypeController.js', 'waf/js/module/uigrid/ui-grid.css',
			                   'waf/js/module/uigrid/ui-grid.js' ],
			                   layoutConfig : 'do/apf/layout/popup/buyBackType',
			                   i18nConfig : 'do/apf/resource/popup/buyBackType',
			                   authorizationConfig : 'do/apf/authorization/popup/buyBackType',
			                   validatorConfig : 'do/apf/validator/popup/buyBackType'
		});
		
		//view partial discount invoice list
		modalServiceProvider.setDialogsModule('apf.partial.InvList', {
			title : 'title.dialogs.partial.invlist',
			pageId : 'APF_POPUP_DISCOUNT_PARTIAL_INV',
			templateUrl : 'apf/view/${theme}/popup/discount/partialInvList.html',
			controller : 'apf.popup.partial.InvList',
			controllerAs : 'vm',
			dependentFiles : [ 'apf/view/${theme}/popup/discount/partialInvListController.js', 'waf/js/module/uigrid/ui-grid.css',
			                   'waf/js/module/uigrid/ui-grid.js' ],
           layoutConfig : 'do/apf/layout/popup/partialInvList',
           i18nConfig : 'do/apf/resource/popup/partialInvList',
           authorizationConfig : 'do/apf/authorization/popup/partialInvList',
           validatorConfig : 'do/apf/validator/popup/partialInvList'
		});
		// view credit memo detail
		modalServiceProvider.setDialogsModule('apf.creditMemo.viewDetail', {
			title : 'title.dialogs.popup',
			pageId : 'APF_CREDITMEMO_POPUP_VIEWDETAIL',
			templateUrl : 'apf/view/${theme}/popup/creditMemo/viewDetail.html',
			controller : 'apf.popup.viewDetailController',
			controllerAs : 'vm',
			dependentFiles : [ 'apf/js/${theme}/service/pi/creditMemoService.js','apf/view/${theme}/popup/creditMemo/viewDetailController.js' ],
			layoutConfig : 'do/apf/layout/popup/creditMemo',
			i18nConfig : 'do/apf/resource/popup/creditMemo',
			authorizationConfig : 'do/apf/authorization/popup/creditMemo',
			validatorConfig : 'do/apf/validator/popup/creditMemo'
		});
		//from fsrms end
		
		//view pi error list in pi load
		modalServiceProvider.setDialogsModule('apf.piError.piErrorList', {
			title : 'title.dialogs.popup',
			pageId : 'APF_POPUP_PIERROR_PIERRORLIST',
			templateUrl : 'apf/view/${theme}/popup/piError/piErrorList.html',
			controller : 'apf.popup.piError.piErrorListController',
			controllerAs : 'vm',
			dependentFiles : [ 'apf/view/${theme}/popup/piError/piErrorListController.js', 'waf/js/module/uigrid/ui-grid.css',
					'waf/js/module/uigrid/ui-grid.js',
					'apf/js/${theme}/service/pi/piInquiryService.js'],
			layoutConfig : 'do/apf/layout/popup/piErrorList',
			i18nConfig : 'do/apf/resource/popup/piErrorList',
			authorizationConfig : 'do/apf/authorization/popup/piErrorList',
			validatorConfig : 'do/apf/validator/popup/piErrorList'
		});
		
		//view invoice detail
		modalServiceProvider.setDialogsModule('apf.invoice.detail', {
			title : 'title.dialogs.popup',
			pageId : 'APF_POPUP_INVOICE.DETAIL',
			templateUrl : 'apf/view/${theme}/popup/invoice/invoiceDetail.html',
			controller : 'apf.popup.invoice.invoiceDetail',
			controllerAs : 'vm',
			dependentFiles : [ 'apf/view/${theme}/popup/invoice/invoiceDetailController.js', 'waf/js/module/uigrid/ui-grid.css',
			                   'waf/js/module/uigrid/ui-grid.js' ],
			                   layoutConfig : 'do/apf/layout/popup/invoiceDetail',
			                   i18nConfig : 'do/apf/resource/popup/invoiceDetail',
			                   authorizationConfig : 'do/apf/authorization/popup/invoiceDetail',
			                   validatorConfig : 'do/apf/validator/popup/invoiceDetail'
		});
		//Extended Maturity Date dynamic parameter popup
		modalServiceProvider.setDialogsModule('apf.discount.extendedMatDate', {
			title : 'title.dialogs.extendedmatdate',
			pageId : 'APF_POPUP_EXTENDED_MATURITY_DATE',
			templateUrl : 'apf/view/${theme}/popup/discount/extendedMatDate.html',
			controller : 'apf.popup.discount.extendedMatDate',
			controllerAs : 'vm',
			dependentFiles : [ 'apf/view/${theme}/popup/discount/extendedMatDateController.js', 'waf/js/module/uigrid/ui-grid.css',
			                   'waf/js/module/uigrid/ui-grid.js' ],
			                   layoutConfig : 'do/apf/layout/popup/extendedMatDate',
			                   i18nConfig : 'do/apf/resource/popup/extendedMatDate',
			                   authorizationConfig : 'do/apf/authorization/popup/extendedMatDate',
			                   validatorConfig : 'do/apf/validator/popup/extendedMatDate'
		});
		
		//view dynamic discount invoice list
		modalServiceProvider.setDialogsModule('apf.dynaInv.dynaInvList', {
			title : 'title.dialogs.popup',
			pageId : 'APF_POPUP_DYNAINV_DYNAINVLIST',
			templateUrl : 'apf/view/${theme}/popup/dynaInv/dynaInvList.html',
			controller : 'apf.popup.dynaInv.dynaInvListController',
			controllerAs : 'vm',
			dependentFiles : [ 'apf/view/${theme}/popup/dynaInv/dynaInvListController.js', 'waf/js/module/uigrid/ui-grid.css',
					'waf/js/module/uigrid/ui-grid.js'],
			layoutConfig : 'do/apf/layout/popup/dynaInvList',
			i18nConfig : 'do/apf/resource/popup/dynaInvList',
			authorizationConfig : 'do/apf/authorization/popup/dynaInvList',
			validatorConfig : 'do/apf/validator/popup/dynaInvList'
		});
		// POPUP DIALOGS END.
	} ]);
})(angular);
